var express = require('express');
var router = express.Router();
const { signup, list, remove, signin, signout, isAuth } = require('../controllers/users');
const { auth } = require('../middlewares/auth')
/* GET users listing. */
// router.get('/', function(req, res, next) {
//   res.send('respond with a resource');
// });

// router.post('/signup', signup);
// router.get('/list', list);
// router.get('/remove', remove);

router.get('/', auth, list);
router.delete('/', auth, remove);
router.post('/', auth, signup);

router.post('/signin', signin);
router.get('/signout', auth, signout);

router.get('/isAuth', isAuth)

module.exports = router;
